<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<c:url value='/css/style.css'/>" rel="stylesheet"
	type="text/css" />
<fmt:setBundle basename="messages" />
<title>View Subordinate History</title>
</head>
<body>
<%@ include file="Header.jsp"%>
		<table cellspacing="2" cellpadding="1" border="1" align="center" width="100%">
		<tr>
			<td width="300px" style="vertical-align: top"><%@ include file="Menu.jsp"%></td>
			<td>
	<h3>View Subordinates' Leaves History</h3>
	<c:choose>
		<c:when test="${not empty empleaves}">
			<table class="borderAll" width="100%">

				<tr>
					<th>Reference</th>
					<th>Employee Id</th>
					<th>Employee Name</th>
					<th>Leave Type</th>
					<th>From Date</th>
					<th>To Date</th>
					<th>Status</th>
					<th>View Detail</th>
				</tr>


				<c:forEach var="empleave" items="${empleaves}" varStatus="status">
					<tr class="${status.index%2==0?'even':'odd'}">
						<td class="nowrap">${empleave.leaveId}</td>
						<td class="nowrap">${empleave.employeeId}</td>
						<td class="nowrap">${empleave.employeeName}</td>
						<td class="nowrap">${empleave.leaveType}</td>
						<td class="nowrap">${empleave.leaveStartDate}</td>
						<td class="nowrap">${empleave.leaveEndDate}</td>
						<td class="nowrap">${empleave.status}</td>

						<td class="nowrap"><c:url var="viewdetail" scope="page"
								value="/viewsubordinate">
								<c:param name="leaveid" value="${empleave.leaveId}" />
							</c:url> <a href="${viewdetail}"><fmt:message
									key="table.lable.leave.viewdetail" />
						</a></td>
					</tr>
				</c:forEach>


			</table>
		</c:when>
		<c:otherwise>
no record is found
</c:otherwise>
	</c:choose>
</td>
</tr>
</table>
</body>
</html>